import Request from './api.js';
import {SCREEN_BASE} from './api.js';

let request = new Request().http


// 按需引入的 请求头
export const GetEnergyTotalComsumption= function(data) {    
    return request({
	url: SCREEN_BASE + "/GetEnergyTotalComsumption",		
        method: "POST",
		data: data
    })
}

export const GetEnergyWorkshopComsumption = function(data){
	return request({
	url: SCREEN_BASE + "/GetEnergyWorkshopComsumption",		
	    method: "POST",
		data: data
	})
}

export const GetEnergyStatisticsWorkshop = function(data){
	return request({
	url: SCREEN_BASE + "/GetEnergyStatisticsWorkshop",		
	    method: "POST",
		data: data
	})
}

export const GetEnergyStatisticsDevice = function(data){
	return request({
	url: SCREEN_BASE + "/GetEnergyStatisticsDevice",		
	    method: "POST",
		data: data
	})
}

export const GetEnergyStatisticsDate = function(dateType, data){
	var url = SCREEN_BASE + "/GetEnergyStatisticsYear";
	if (dateType == 1){
		url = SCREEN_BASE + "/GetEnergyStatisticsMonth";
	}
	return request({
		url: url,		
	    method: "POST",
		data: data
	})
}
